The above-mentioned application Ser. Nos. 207,097 and 207,152 disclose a cache/disk data processing system having means for decreasing the average time required to access data where that data is stored on disks. A cache memory is provided and data in this memory may be accessed in a much shorter time than if the data were accessed directly from the disks. The cache memory stores segments of data, these segments containing the most recently accessed words or the words most likely to be accessed within a short interval. When a host processor wishes to access a disk location or locations, it sends a command to a storage control unit which first checks to see if the data from the desired disk locations is resident in the cache memory. If it is, the data is returned to the host. If the data is not resident in the cache memory then it is staged by segments from a disk, placed in the cache memory, and sent to the host. However, this may require that some of the segments in the cache memory be replaced by the segments from the disks. As taught by application Ser. Nos. 207,097 and 207,152, this is accomplished by providing a segment descriptor table having an entry associated with each segment resident in the cache memory. Each entry in the segment descriptor table includes a forward and a backward age link address whereby the segments are linked from least recently used to the most recently used. When a segment must be replaced to make room for another segment, it is the least recently used segment which is replaced.
In the system described above a segment is relinked at the most recently used position each time it is referenced. During what would otherwise be idle time for the storage control unit, it trickles back to the disks segments in the cache memory which have been written to since they were first loaded into the cache memory from the disks. Segments are trickled back to the disks only if they have been written to and are then trickled back in order from the least recently used to the most recently used.
In the foregoing system a write operation is acknowledged to the host when data from the host is written into the cache memory. Between the time a write is acknowledged to the host and the time the data is actually written to the disk (by replacement or trickling) there is a window of vulnerability to any cache failure such as power loss which destroys the data. Concurrently filed application Ser. No. 354,558 claims novel means for controlling trickling to thereby shorten the window of vulnerability. However, to obtain maximum benefit from the use of the cache memory it is necessary to limit trickling so that a segment may not be trickled until it has been resident in the cache memory for some specified interval of time, say three seconds, after it has first been written to. This delay in trickling insures that written-to segments remain in cache during an interval when they are likely to be used again in executing a further command from the host processor. Thus, there is at least a minimum period of time during which a cache failure may occur and data may be lost because it has not been written to a disk.
In accordance with the present invention a parameter (TOLDEST) is maintained which, at any time, respresents the age since first write of the oldest written-to segment in cache memory which has not been written back to a disk. The host processor intermittently samples TOLDEST and stores the most recent sampling. In the event of a cache failure, this parameter is retrieved by the host processor and can be correlated by the host processor with other file recovery synchronization information (i.e. on a system audit trail) to determine a useful upper bound on the amount of data which may have been lost due to the cache failure.